<h1>Fakture</h1>
<div class="elementFilter">
    <form action="<?php echo url_for('faktura/index') ?>" method="post">
     <table ><tr>
    <?php echo $filter ?>

         </tr><td colspan="5" align="center">    <input  type="submit" value="Pošalji"> </td></tr>
       </table>
        </form>

</div>
<table id="rounded-corner">
  <thead>
    <tr>
     
        <th class="rounded-company">Datum fakturisanja</th>
      <th>Vrsta dakture</th>
      <th>Nalog prodaje</th>
      <th>Ukupan isnos po nabavnoj ceni</th>
      <th>Ukupan porez</th>
      <th>Transportni troskovi</th>
      <th>Ukupan iznos racuna</th>
      <th>Profit</th>
      <th class="rounded-qend"> Nalog</th>
    </tr>
  </thead>
   <tfoot>
    	<tr>
        	<td colspan="" class="rounded-foot-left">&nbsp;</td>
                <td colspan="7" ><em> <?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'faktura/index?page='.$pager->getFirstPage()) ?>
  <?php echo link_to('&lt;', 'faktura/index?page='.$pager->getPreviousPage()) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
    <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'faktura/index?page='.$page) ?>
    <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'faktura/index?page='.$pager->getNextPage()) ?>
  <?php echo link_to('&raquo;', 'faktura/index?page='.$pager->getLastPage()) ?>
<?php endif ?>

 
</em></td>                    
        	<td class="rounded-foot-right"> &nbsp</td>
        </tr>
    </tfoot>
  <tbody>
    <?php foreach ($faktura_list as $faktura): ?>
    <tr>
     
      <td><?php echo $faktura->getDatumFakturisanja() ?></td>
      <td><?php echo $faktura->getVrstaDakture() ?></td>
      <td><?php echo $faktura->getNalogProdajeId() ?></td>
      <td><?php echo $faktura->getUkupanIsnosPoNabavnojCeni() ?></td>
      <td><?php echo $faktura->getUkupanPorez() ?></td>
      <td><?php echo $faktura->getTransportniTroskovi() ?></td>
      <td><?php echo $faktura->getUkupanIznosRacuna() ?></td>
      <td><?php echo $faktura->getProfit() ?></td>
      <td><a href="<?php echo url_for1('nalog/index?nalog_id='.$faktura->getNalogProdajeId()) ?>"><?php echo $faktura->getNalogProdaje()->getAdmin()->getIme()."  -  ".$faktura->getNalogProdaje()->getDatumRealizacije() ?></a></td>
      
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
 